=image_tag @config.file.url

= form_for(@config) do |f|
  - if @config.errors.any?
    #error_explanation
      %h2
        = pluralize(@config.errors.count, "error")
        prohibited this config from being saved:
      %ul
        - @config.errors.full_messages.each do |message|
          %li= message
  .field
    = hidden_field_tag 'after_update', nil, value: login_ad_path
    %br/
    %label 请选择用户登录界面处的广告图片
    = f.file_field :file
    %br
  .actions
    = f.submit '上传', class: 'btn btn-primary'